package com.yo.example.provider;
import com.yo.example.common.service.UserService;
import com.yo.yorpc.RPCApplication;
import com.yo.yorpc.registry.LocalRegistry;
import com.yo.yorpc.server.HttpServer;
import com.yo.yorpc.server.VertxHttpServer;

/**
 * 简易服务提供者实例
 */
public class EasyProviderExample {
    public static void main(String[] args) {
        //rpc框架初始化
        RPCApplication.init();
        //注册服务
        LocalRegistry.register(UserService.class.getName(), UserServiceImpl.class);
        //提供服务
        HttpServer httpServer=new VertxHttpServer();
        httpServer.doStart(8080);
    }
}
